feat(Breadcrumb): add color prop#6406
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds an optional Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
color prop
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/runtime/components/Breadcrumb.vue`:
- Around line 93-95: Breadcrumb.vue defines a prop named ui (BreadcrumbProps)
and also declares a local computed const ui = ... which causes a duplicate key
error; rename the computed from ui to uiTv (change const ui = computed(...) to
const uiTv = computed(...)) and then update every usage: replace all template
expressions calling ui.*() with uiTv.*(), and replace all slot bindings :ui="ui"
with :ui="uiTv" (ensure every occurrence in the template where ui is
referenced—calls at the tv helper and slot bindings—is updated).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 898d2893-4a12-4775-839c-672f7164edde
📒 Files selected for processing (1)
src/runtime/components/Breadcrumb.vue
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/theme/breadcrumb.ts`:
- Around line 45-57: The compound-variant generation in breadcrumb.ts may
produce two matching variants for color: 'neutral' + active: true because the
spread maps options.theme.colors and then adds an explicit neutral variant;
update the generation in the map for (options.theme.colors || []) to skip/filter
out 'neutral' (or deduplicate the resulting array) so only the explicit neutral
variant remains; reference the map expression that builds variants and the
explicit object with color: 'neutral', active: true, class: { link:
'text-highlighted' } when making the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 35c71719-c1c7-41ef-9241-6b24e323c2d4
⛔ Files ignored due to path filters (2)
test/components/__snapshots__/Breadcrumb-vue.spec.ts.snapis excluded by!**/*.snaptest/components/__snapshots__/Breadcrumb.spec.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (4)
playgrounds/nuxt/app/pages/components/breadcrumb.vuesrc/runtime/components/Breadcrumb.vuesrc/theme/breadcrumb.tstest/components/Breadcrumb.spec.ts
✅ Files skipped from review due to trivial changes (1)
- src/runtime/components/Breadcrumb.vue
🚧 Files skipped from review as they are similar to previous changes (1)
- test/components/Breadcrumb.spec.ts
🔗 Linked issue
Resolves #3052
❓ Type of change
📚 Description
📝 Checklist